ALL = pwguesser server ccreader
CC = gcc
CFLAGS = -g
ARCH = $(shell uname -p)
ifeq ($(ARCH), sparc)
LIBS = -lm -lsocket -lnsl
else
LIBS = -lm
endif

all: $(ALL)

clean:
	rm -rf $(ALL) *.o

pwguesser:  pwguesser.c pwguesser.h
	$(CC) $(CFLAGS) -o pwguesser pwguesser.c $(LIBS)

server:  server.c
	$(CC) $(CFLAGS) -o server server.c $(LIBS)

ccreader:  ccreader.c
	$(CC) $(CFLAGS) -o ccreader ccreader.c $(LIBS)
